home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / mindbo1a / frmscore.frm < prev    next >
Text File  |  1999-04-19  |  7KB  |  225 lines

  1. VERSION 5.00
  2. Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
  3. Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
  4. Begin VB.Form frmScore 
  5.    BorderStyle     =   3  'Fixed Dialog
  6.    Caption         =   "Mind Boggle"
  7.    ClientHeight    =   2190
  8.    ClientLeft      =   2760
  9.    ClientTop       =   3750
  10.    ClientWidth     =   5940
  11.    ControlBox      =   0   'False
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   2190
  16.    ScaleWidth      =   5940
  17.    ShowInTaskbar   =   0   'False
  18.    Begin VB.CommandButton cmdOK 
  19.       Caption         =   "OK"
  20.       Enabled         =   0   'False
  21.       Height          =   495
  22.       Left            =   4440
  23.       TabIndex        =   4
  24.       Top             =   240
  25.       Width           =   1215
  26.    End
  27.    Begin MSAdodcLib.Adodc AdoWin 
  28.       Height          =   375
  29.       Left            =   4320
  30.       Top             =   1320
  31.       Visible         =   0   'False
  32.       Width           =   1575
  33.       _ExtentX        =   2778
  34.       _ExtentY        =   661
  35.       ConnectMode     =   0
  36.       CursorLocation  =   3
  37.       IsolationLevel  =   -1
  38.       ConnectionTimeout=   15
  39.       CommandTimeout  =   30
  40.       CursorType      =   3
  41.       LockType        =   3
  42.       CommandType     =   1
  43.       CursorOptions   =   0
  44.       CacheSize       =   50
  45.       MaxRecords      =   0
  46.       BOFAction       =   0
  47.       EOFAction       =   0
  48.       ConnectStringType=   1
  49.       Appearance      =   1
  50.       BackColor       =   -2147483643
  51.       ForeColor       =   -2147483640
  52.       Orientation     =   0
  53.       Enabled         =   -1
  54.       Connect         =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=a:\Winners.mdb"
  55.       OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=a:\Winners.mdb"
  56.       OLEDBFile       =   ""
  57.       DataSourceName  =   ""
  58.       OtherAttributes =   ""
  59.       UserName        =   ""
  60.       Password        =   ""
  61.       RecordSource    =   "select * from WinnersTAB order by fldscore"
  62.       Caption         =   ""
  63.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  64.          Name            =   "MS Sans Serif"
  65.          Size            =   8.25
  66.          Charset         =   0
  67.          Weight          =   400
  68.          Underline       =   0   'False
  69.          Italic          =   0   'False
  70.          Strikethrough   =   0   'False
  71.       EndProperty
  72.       _Version        =   393216
  73.    End
  74.    Begin VB.TextBox txtEnterName 
  75.       DataField       =   "fldName"
  76.       DataSource      =   "AdoWin"
  77.       Height          =   375
  78.       Left            =   2040
  79.       TabIndex        =   0
  80.       Top             =   240
  81.       Width           =   1455
  82.    End
  83.    Begin MSDataGridLib.DataGrid DataGrid1 
  84.       Bindings        =   "frmScore.frx":0000
  85.       Height          =   1095
  86.       Left            =   2040
  87.       TabIndex        =   3
  88.       Top             =   840
  89.       Width           =   2055
  90.       _ExtentX        =   3625
  91.       _ExtentY        =   1931
  92.       _Version        =   393216
  93.       AllowUpdate     =   0   'False
  94.       AllowArrows     =   -1  'True
  95.       Enabled         =   -1  'True
  96.       ColumnHeaders   =   -1  'True
  97.       HeadLines       =   1
  98.       RowHeight       =   15
  99.       RowDividerStyle =   5
  100.       FormatLocked    =   -1  'True
  101.       AllowAddNew     =   -1  'True
  102.       BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  103.          Name            =   "MS Sans Serif"
  104.          Size            =   8.25
  105.          Charset         =   0
  106.          Weight          =   400
  107.          Underline       =   0   'False
  108.          Italic          =   0   'False
  109.          Strikethrough   =   0   'False
  110.       EndProperty
  111.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  112.          Name            =   "MS Sans Serif"
  113.          Size            =   8.25
  114.          Charset         =   0
  115.          Weight          =   400
  116.          Underline       =   0   'False
  117.          Italic          =   0   'False
  118.          Strikethrough   =   0   'False
  119.       EndProperty
  120.       ColumnCount     =   2
  121.       BeginProperty Column00 
  122.          DataField       =   "fldName"
  123.          Caption         =   "Name"
  124.          BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  125.             Type            =   0
  126.             Format          =   ""
  127.             HaveTrueFalseNull=   0
  128.             FirstDayOfWeek  =   0
  129.             FirstWeekOfYear =   0
  130.             LCID            =   1033
  131.             SubFormatType   =   0
  132.          EndProperty
  133.       EndProperty
  134.       BeginProperty Column01 
  135.          DataField       =   "fldScore"
  136.          Caption         =   "Max Blocks"
  137.          BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  138.             Type            =   0
  139.             Format          =   ""
  140.             HaveTrueFalseNull=   0
  141.             FirstDayOfWeek  =   0
  142.             FirstWeekOfYear =   0
  143.             LCID            =   1033
  144.             SubFormatType   =   0
  145.          EndProperty
  146.       EndProperty
  147.       SplitCount      =   1
  148.       BeginProperty Split0 
  149.          RecordSelectors =   0   'False
  150.          BeginProperty Column00 
  151.             Object.Visible         =   -1  'True
  152.             ColumnWidth     =   870.236
  153.          EndProperty
  154.          BeginProperty Column01 
  155.             Alignment       =   2
  156.             DividerStyle    =   3
  157.             ColumnWidth     =   945.071
  158.          EndProperty
  159.       EndProperty
  160.    End
  161.    Begin VB.Label lblScore 
  162.       BackColor       =   &H80000009&
  163.       BorderStyle     =   1  'Fixed Single
  164.       DataField       =   "fldScore"
  165.       DataSource      =   "AdoWin"
  166.       Height          =   375
  167.       Left            =   3600
  168.       TabIndex        =   5
  169.       Top             =   240
  170.       Width           =   495
  171.    End
  172.    Begin VB.Label Label2 
  173.       Caption         =   "Current winners:"
  174.       Height          =   495
  175.       Left            =   600
  176.       TabIndex        =   2
  177.       Top             =   960
  178.       Width           =   1215
  179.    End
  180.    Begin VB.Label Label1 
  181.       Caption         =   "Enter your name here:"
  182.       Height          =   375
  183.       Left            =   480
  184.       TabIndex        =   1
  185.       Top             =   240
  186.       Width           =   1335
  187.    End
  188. End
  189. Attribute VB_Name = "frmScore"
  190. Attribute VB_GlobalNameSpace = False
  191. Attribute VB_Creatable = False
  192. Attribute VB_PredeclaredId = True
  193. Attribute VB_Exposed = False
  194.  
  195. Option Explicit
  196.  
  197. Private Sub cmdOK_Click()
  198.     Dim lngRc As Long
  199.     Unload Me
  200.     lngRc = sndPlaySound(App.Path & "\Bell.wav", 0)
  201. End Sub
  202.  
  203. Private Sub Form_Load()
  204.     With frmScore
  205.         .Top = (Screen.Height - frmScore.Height) / 2
  206.         .Left = (Screen.Width - frmScore.Width) / 2
  207.     End With
  208.     frmScore.AdoWin.Recordset.AddNew
  209.     frmScore.AdoWin.Recordset.Fields("fldscore") = intScore
  210. End Sub
  211.  
  212.  
  213.  
  214. Private Sub txtEnterName_Change()
  215.     Dim strTxtName As String
  216.     strTxtName = Trim(txtEnterName.Text)
  217.     If strTxtName <> "" Then
  218.         cmdOK.Enabled = True
  219.     Else
  220.         cmdOK.Enabled = False
  221.     End If
  222.     
  223.     
  224. End Sub
  225.